package org.martin.snsrs.client.services.http;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;

import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.entity.HttpEntityWrapper;

public class InflatingEntity extends HttpEntityWrapper {

	public InflatingEntity(HttpEntity wrapped) {
		super(wrapped);
	}

	@Override
	public InputStream getContent() throws IOException, IllegalStateException {
		// TODO Auto-generated method stub
		return new GZIPInputStream(wrappedEntity.getContent());
	}

	@Override
	public long getContentLength(){
		return -1L;
	}
}
